package com.sluggard.workflow.config;

import jakarta.annotation.Resource;
import org.camunda.bpm.engine.AuthorizationService;
import org.camunda.bpm.engine.CaseService;
import org.camunda.bpm.engine.DecisionService;
import org.camunda.bpm.engine.ExternalTaskService;
import org.camunda.bpm.engine.FilterService;
import org.camunda.bpm.engine.FormService;
import org.camunda.bpm.engine.HistoryService;
import org.camunda.bpm.engine.IdentityService;
import org.camunda.bpm.engine.ManagementService;
import org.camunda.bpm.engine.ProcessEngine;
import org.camunda.bpm.engine.RepositoryService;
import org.camunda.bpm.engine.RuntimeService;
import org.camunda.bpm.engine.TaskService;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

@Component
public class BeanConfiguration {

    @Resource
    private ProcessEngine processEngine;

    @Bean
    private RuntimeService getRuntimeService() {
        return processEngine.getRuntimeService();
    }

    @Bean
    private RepositoryService getRepositoryService() {
        return processEngine.getRepositoryService();
    }

    @Bean
    private FormService getFormService() {
        return processEngine.getFormService();
    }

    @Bean
    private TaskService getTaskService() {
        return processEngine.getTaskService();
    }

    @Bean
    private HistoryService getHistoryService() {
        return processEngine.getHistoryService();
    }

    @Bean
    private IdentityService getIdentityService() {
        return processEngine.getIdentityService();
    }

    @Bean
    private ManagementService getManagementService() {
        return processEngine.getManagementService();
    }

    @Bean
    private AuthorizationService getAuthorizationService() {
        return processEngine.getAuthorizationService();
    }

    @Bean
    private CaseService getCaseService() {
        return processEngine.getCaseService();
    }

    @Bean
    private FilterService getFilterService() {
        return processEngine.getFilterService();
    }

    @Bean
    private ExternalTaskService getExternalTaskService() {
        return processEngine.getExternalTaskService();
    }

    @Bean
    private DecisionService getDecisionService() {
        return processEngine.getDecisionService();
    }


}
